package com.tongda.core.common;

import java.util.ArrayList;
import java.util.List;

import android.app.Activity;
import android.app.Application;
import android.widget.TextView;

import com.tongda.core.vo.Dish;
import com.tongda.core.vo.Employee;
import com.tongda.core.vo.Table;

/**
 * 
 * @author andy
 * 
 */
public class KernalApplication extends Application {
	private Object messageNativeService;
	private TextView messageCount = null;
	private boolean networkIsAvailable = true;
	private Employee currentUser;
	// 显示账单中已点菜品的数量以及价格的字符串
	private String result;
	private static KernalApplication instance = null;

	/*
	 * 下面的属性是电子菜谱用到的属性
	 */
	// 在菜谱中各个界面操作的唯一餐台
	private Table menuSelectedTable;
	// 在菜谱中主界面是否刷新数据的标志
	private boolean menuMainIsRefresh;
	// 菜谱本地存储的全单备注信息（把全单备注信息存贮在一个Dish实体的属性中）
	private Dish billNotes;

	public static KernalApplication getInstance() {
		if (instance == null) {
			synchronized (KernalApplication.class) {
				if (instance == null) {
					instance = new KernalApplication();
				}
			}
		}
		return instance;
	}

	public boolean isNetworkIsAvailable() {
		return networkIsAvailable;
	}

	public void setNetworkIsAvailable(boolean networkIsAvailable) {
		this.networkIsAvailable = networkIsAvailable;
	}

	public Employee getCurrentUser() {
		return currentUser;
	}

	public void setCurrentUser(Employee currentUser) {
		this.currentUser = currentUser;
	}

	public Object getMessageNativeService() {
		return messageNativeService;
	}

	public void setMessageNativeService(Object messageNativeService) {
		this.messageNativeService = messageNativeService;
	}

	public TextView getMessageCount() {
		return messageCount;
	}

	public void setMessageCount(TextView messageCount) {
		this.messageCount = messageCount;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public Table getMenuSelectedTable() {
		return menuSelectedTable;
	}

	public void setMenuSelectedTable(Table menuSelectedTable) {
		this.menuSelectedTable = menuSelectedTable;
	}

	public boolean isMenuMainIsRefresh() {
		return menuMainIsRefresh;
	}

	public void setMenuMainIsRefresh(boolean menuMainIsRefresh) {
		this.menuMainIsRefresh = menuMainIsRefresh;
	}

	public Dish getBillNotes() {
		return billNotes;
	}

	public void setBillNotes(Dish billNotes) {
		this.billNotes = billNotes;
	}

}